{include file="public/header" /}
</head>
<body>
  <form id="form" method="post" class="form-x" action="">
<div class="panel admin-panel">
  <div class="panel-head"><strong class="icon-reorder">权限设置</strong></div>
  
  <table class="table table-hover text-left">
      {$data}
  </table>
  <input type="hidden" class="input w50" name="id" value="{$info.id}" />

</div>
<div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field  text-center">
          <a class="button bg-main icon-check-square-o" onclick="submit()"> 提交</a>
        </div>
      </div>   
  </form>

  <script>
      function submit(){
          var data=new FormData($("#form")[0]);
          $.ajax({
              type:"POST",
              url:"{:U('AdminRole/auth')}",
              data:data,
              dataType:"json",
              processData:false,
              contentType:false,
              cache:false,
              success:function(rs){
                  layer.msg(rs.msg);
              }
          });
      }

  </script>
{include file="public/footer" /}